/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package FilterCommon;

import FilterCommon.FilterView;
import java.awt.Color;
import java.awt.Graphics;

/**
 *
 * @author kleks
 */
public class Connection
{   FilterView outFilter;
    int outNumber;
    FilterView inFilter;
    int inNumber;

    public Connection(FilterView outFilter, int outNumber, FilterView inFilter, int inNumber)
    {
        this.outFilter = outFilter;
        this.outNumber = outNumber;

        this.inFilter = inFilter;
        this.inNumber = inNumber;
    }

    public void paintFilter(Graphics g)
    {
        g.setColor(Color.RED);
        g.drawLine(outFilter.getOutConnectionX(outNumber),
                   outFilter.getOutConnectionY(outNumber),
                   inFilter.getInConnectionX(inNumber),
                   inFilter.getInConnectionY(inNumber));
    }
}
